﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using QLKhachSan.DTO;
using System.Data;
using System.Data.SqlClient;

namespace QLKhachSan.DAO
{
    public class DAO_PhieuDenBu
    {
        public static void themPhieuDenBu(DTO_PhieuDenBu p)
        {
            string[] name = new string[4] {"@MaPhieuDen","@TenPhong","@SoTien","@LyDo" };
            object[] ob = new object[4] { p.MaPhieuDen,p.TenPhong,p.SoTien,p.LyDo};
            clsKetNoi.ThucThiLenhCoTS("pr_ThemPhieuDenBu", name, ob, 4);
        }
        public static DataTable hienthiDanhSachPhieuDenBu()
        {
            return clsKetNoi.Load("pr_HienThiPhieuDenBu");
        }
        public static DataTable hienthiDanhSachPhieuDenBuDeThanhToan(DTO_PhieuDenBu p)
        {
            string[] name = new string[1] {"@MaPhieuDen" };
            object[] ob = new object[1] { p.MaPhieuDen};
            return clsKetNoi.LoadCoTS("pr_HienThiPhieuDenBuDeThanhToan",name,ob,1);
        }
        
        public static DataTable hienthiDanhSachPhieuDenBuThongKe()
        {
            return clsKetNoi.Load("pr_HienThiPhieuDenBuThongKe");
        }
    }
}
